<import template="/panel/_head" />
<php>
    $openNode = \Helper\Stats::countNode(1);
    $allNode = \Helper\Stats::countNode()
</php>
<body class="page-body">
<div class="modal fade" id="modal-1" style="display: none;" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">提示</h4>
            </div>
            <div class="modal-body"></div>
            <div class="modal-footer">
                <button type="button" class="btn btn-white" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-info" data-dismiss="modal">确定</button>
            </div>
        </div>
    </div>
</div>
<div class="page-loading-overlay">
    <div class="loader-2"></div>
</div>
<div class="settings-pane">
    <a href="javascript:;" data-toggle="settings-pane" data-animate="true">&times;</a>
    <div class="settings-pane-inner">
        <div class="row">
            <div class="col-md-6">
                <div class="user-info">
                    <div class="user-image">
                        <a href="/member">
                            <img src="{(\Helper\Utils::gravatar($user->email))}" class="img-responsive img-circle" />
                        </a>
                    </div>
                    <div class="user-details">
                        <h3>
                            <a href="/member">{$user->nickname}</a>
                            <!-- Available statuses: is-online, is-idle, is-busy and is-offline -->
                            <span class="user-status is-online"></span>
                        </h3>
                        <p class="user-title">加入时间：{(date('Y-m-d H:i:s', $user->regDateLine))}</p>
                        <div class="user-links">
                            <a href="/member/info" class="btn btn-primary">个人资料</a>
                            <a href="/auth/Logout" class="btn btn-success">退出</a>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-6 link-blocks-env">
                <div class="links-block left-sep">
                    <h4>
                        <a href="javascript:;">
                            <span>帮助</span>
                        </a>
                    </h4>
                    <ul class="list-unstyled">
                        <li>
                            <a href="Support/Tos">
                                <i class="fa-angle-right"></i>
                                支持中心
                            </a>
                        </li>
                        <li>
                            <a href="/member/feedback">
                                <i class="fa-angle-right"></i>
                                提交问题
                            </a>
                        </li>
                        <li>
                            <a href="Support/Tos">
                                <i class="fa-angle-right"></i>
                                使用协议
                            </a>
                        </li>
                        <li>
                            <a href="Support/Tos">
                                <i class="fa-angle-right"></i>
                                服务条款
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="page-container">
    <div class="sidebar-menu toggle-others fixed">
        <div class="sidebar-menu-inner">
            <header class="logo-env">
                <!-- logo -->
                <div class="logo">
                    <a href="index" class="logo-expanded">
                        <img src="{RESOURCE}/images/logo@2x.png" width="80" alt="" />
                    </a>
                    <a href="index" class="logo-collapsed">
                        <img src="{RESOURCE}/images/logo-collapsed@2x.png" width="40" alt="" />
                    </a>
                </div>
                <div class="mobile-menu-toggle visible-xs">
                    <a href="javascript:;" data-toggle="user-info-menu">
                        <i class="fa-bell-o"></i>
                        <span class="badge badge-success"></span>
                    </a>
                    <a href="javascript:;" data-toggle="mobile-menu">
                        <i class="fa-bars"></i>
                    </a>
                </div>
                <div class="settings-icon">
                    <a href="javascript:;" data-toggle="settings-pane" data-animate="true">
                        <i class="fa fa-cog"></i>
                    </a>
                </div>
            </header>
            <ul id="main-menu" class="main-menu">
                <li class="{(\Helper\Utils::menuActive('home', 'opened'))}">
                    <a href="/admin/home" class="pjax">
                        <i class="fa fa-desktop"></i>
                        <span class="title">仪表盘</span>
                    </a>
                </li>
                <li class="{(\Helper\Utils::menuActive('node'))}">
                    <a href="/admin/node" class="pjax">
                        <i class="fa fa-server"></i>
                        <span class="title">节点管理</span>
                        <span class="label label-success pull-right">{$openNode}/{$allNode}</span>
                    </a>
                </li>
                <li class="{(\Helper\Utils::menuActive('user'))}">
                    <a href="/admin/user" class="pjax">
                        <i class="fa fa-users"></i>
                        <span class="title">用户管理</span>
                    </a>
                </li>
                <li class="{(\Helper\Utils::menuActive('card'))}">
                    <a href="/admin/card" class="pjax">
                        <i class="fa fa-credit-card"></i>
                        <span class="title">卡号管理</span>
                    </a>
                </li>
                <li class="{(\Helper\Utils::menuActive('invite', ' opened expanded'))} has-sub">
                    <a href="javascript:;">
                        <i class="fa fa-heart"></i>
                        <span class="title">邀请码管理</span>
                    </a>
                    <ul>
                        <li class="{(\Helper\Utils::menuActive('inviteList'))}">
                            <a href="/admin/invite/inviteList" class="pjax">
                                <i class="fa fa-heart-o"></i>
                                <span class="title">邀请码列表</span>
                            </a>
                        </li>
                        <li class="{(\Helper\Utils::menuActive('inviteOldList'))}">
                            <a href="/admin/invite/inviteOldList" class="pjax">
                                <i class="fa fa-heartbeat"></i>
                                <span class="title">历史邀请码</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="{(\Helper\Utils::menuActive('message'))}">
                    <a href="/admin/message" class="pjax">
                        <i class="fa fa-comment"></i>
                        <span class="title">消息管理</span>
                    </a>
                </li>
                <li class="{(\Helper\Utils::menuActive('setting|information|cron|system|mailer', ' opened expanded'))} has-sub">
                    <a href="javascript:;">
                        <i class="fa fa-cogs"></i>
                        <span class="title">系统设置</span>
                    </a>
                    <ul>
                        <li class="{(\Helper\Utils::menuActive('system'))}">
                            <a href="/admin/setting/system">
                                <i class="fa fa-cog"></i>
                                <span class="title">系统设置</span>
                            </a>
                        </li>
                        <li class="{(\Helper\Utils::menuActive('information'))}">
                            <a href="/admin/setting/information">
                                <i class="fa fa-cogs"></i>
                                <span class="title">详细参数</span>
                            </a>
                        </li>
                        <li class="{(\Helper\Utils::menuActive('mailer'))}">
                            <a href="/admin/mailer">
                                <i class="fa fa-envelope"></i>
                                <span class="title">邮件设置</span>
                            </a>
                        </li>
                        <li class="{(\Helper\Utils::menuActive('cron'))}">
                            <a href="/admin/cron" class="pjax">
                                <i class="fa fa-tasks"></i>
                                <span class="title">计划任务</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="/member">
                        <i class="fa fa-reply"></i>
                        <span class="title">返回前台</span>
                    </a>
                </li>
            </ul>
        </div>
    </div>
